package com.ruoyi.logistics.domain.DTO;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 物流追踪对象 qc_logistics_tracking
 *
 * @author ruoyi
 * @date 2025-05-24
 */

@Document(indexName = "qc_logistics_tracking")
public class QcLogisticsTrackingEsDTO {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Id
    private Long id;

    /**
     * Shipment ID
     */
    @Field(type = FieldType.Keyword)
    private String shipmentId;

    /**
     * 账号标记
     */
    @Field(type = FieldType.Keyword)
    private String account;

    /**
     * 发货日期
     */
    // @JsonFormat(pattern = "yyyy-MM-dd")
    // @Field(type = FieldType.Date, format = DateFormat.year_month_day)
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:dd")
    private Date sendDate;

    /**
     * 体积重除数
     */
    @Field(type = FieldType.Keyword)
    private String volumeRatio;

    /**
     * 渠道
     */
    @Field(type = FieldType.Keyword)
    private String channel;

    /**
     * 总箱数
     */
    @Field(type = FieldType.Integer)
    private Integer totalBoxNum;

    /**
     * 方数
     */
    @Field(type = FieldType.Scaled_Float, scalingFactor = 100000)
    private BigDecimal squareNum;

    /**
     * 重量
     */
    @Field(type = FieldType.Scaled_Float, scalingFactor = 100000)
    private BigDecimal weight;

    /**
     * units
     */
    @Field(type = FieldType.Integer)
    private Integer units;

    /**
     * 货值
     */
    @Field(type = FieldType.Scaled_Float, scalingFactor = 100)
    private BigDecimal price;

    /**
     * 仓库代号
     */
    @Field(type = FieldType.Keyword)
    private String warehouseCode;

    /**
     * 实际物流运费（rmb）
     */
    @Field(type = FieldType.Scaled_Float, scalingFactor = 100)
    private BigDecimal logisticsPrice;

    /**
     * 平均单价（CBM）
     */
    @Field(type = FieldType.Scaled_Float, scalingFactor = 100)
    private BigDecimal aveUnitPrice;

    /**
     * 开船日期
     */
    // @JsonFormat(pattern = "yyyy-MM-dd")
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:dd")
    private Date sailDate;

    /**
     * 到港日期
     */
    // @JsonFormat(pattern = "yyyy-MM-dd")
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:dd")
    private Date arrivalDate;

    /**
     * 签收时间
     */
    // @JsonFormat(pattern = "yyyy-MM-dd")
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:dd")
    private Date signForDate;

    /**
     * 时效
     */
    @Field(type = FieldType.Integer)
    private Integer ageing;

    /**
     * 运单号
     */
    @Field(type = FieldType.Keyword)
    private String waybillNum;

    /**
     * 付款状态 1-已付款 2-未付款
     */
    @Field(type = FieldType.Integer)
    private Integer paymentStatus;

    /**
     * 船名
     */
    @Field(type = FieldType.Keyword)
    private String shipsName;

    /**
     * 上架数量
     */
    @Field(type = FieldType.Integer)
    private Integer groundingNum;

    /**
     * 删除状态 0-未删除 1-已删除
     */
    @Field(type = FieldType.Integer)
    private Integer isDelete;

    /**
     * 状态 1-已完结 2-未完结
     */
    @Field(type = FieldType.Integer)
    private Integer status;

    /**
     * 创建人ID
     */
    @Field(type = FieldType.Long)
    private Long createUserId;

    /**
     * 创建人名称
     */
    @Field(type = FieldType.Keyword)
    private String createUserName;

    /**
     * 更新人ID
     */
    @Field(type = FieldType.Integer)
    private Long updateUserId;

    /**
     * 更新人ID
     */
    @Field(type = FieldType.Keyword)
    private String updateUserName;
    /**
     * 创建时间
     */
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:dd")
    private Date createTime;
    /**
     * 更新时间
     */
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:dd")
    private Date updateTime;
    /**
     * 备注
     */
    @Field(type = FieldType.Keyword)
    private String remark;


    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setShipmentId(String shipmentId) {
        this.shipmentId = shipmentId;
    }

    public String getShipmentId() {
        return shipmentId;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getAccount() {
        return account;
    }

    public void setSendDate(Date sendDate) {
        this.sendDate = sendDate;
    }

    public Date getSendDate() {
        return sendDate;
    }

    public void setVolumeRatio(String volumeRatio) {
        this.volumeRatio = volumeRatio;
    }

    public String getVolumeRatio() {
        return volumeRatio;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getChannel() {
        return channel;
    }

    public void setTotalBoxNum(Integer totalBoxNum) {
        this.totalBoxNum = totalBoxNum;
    }

    public Integer getTotalBoxNum() {
        return totalBoxNum;
    }

    public void setSquareNum(BigDecimal squareNum) {
        this.squareNum = squareNum;
    }

    public BigDecimal getSquareNum() {
        return squareNum;
    }

    public void setWeight(BigDecimal weight) {
        this.weight = weight;
    }

    public BigDecimal getWeight() {
        return weight;
    }

    public void setUnits(Integer units) {
        this.units = units;
    }

    public Integer getUnits() {
        return units;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setWarehouseCode(String warehouseCode) {
        this.warehouseCode = warehouseCode;
    }

    public String getWarehouseCode() {
        return warehouseCode;
    }

    public void setLogisticsPrice(BigDecimal logisticsPrice) {
        this.logisticsPrice = logisticsPrice;
    }

    public BigDecimal getLogisticsPrice() {
        return logisticsPrice;
    }

    public void setAveUnitPrice(BigDecimal aveUnitPrice) {
        this.aveUnitPrice = aveUnitPrice;
    }

    public BigDecimal getAveUnitPrice() {
        return aveUnitPrice;
    }

    public void setSailDate(Date sailDate) {
        this.sailDate = sailDate;
    }

    public Date getSailDate() {
        return sailDate;
    }

    public void setArrivalDate(Date arrivalDate) {
        this.arrivalDate = arrivalDate;
    }

    public Date getArrivalDate() {
        return arrivalDate;
    }

    public void setSignForDate(Date signForDate) {
        this.signForDate = signForDate;
    }

    public Date getSignForDate() {
        return signForDate;
    }

    public void setAgeing(Integer ageing) {
        this.ageing = ageing;
    }

    public Integer getAgeing() {
        return ageing;
    }

    public void setWaybillNum(String waybillNum) {
        this.waybillNum = waybillNum;
    }

    public String getWaybillNum() {
        return waybillNum;
    }

    public void setPaymentStatus(Integer paymentStatus) {
        this.paymentStatus = paymentStatus;
    }

    public Integer getPaymentStatus() {
        return paymentStatus;
    }

    public void setShipsName(String shipsName) {
        this.shipsName = shipsName;
    }

    public String getShipsName() {
        return shipsName;
    }

    public void setGroundingNum(Integer groundingNum) {
        this.groundingNum = groundingNum;
    }

    public Integer getGroundingNum() {
        return groundingNum;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }

    public String getUpdateUserName() {
        return updateUserName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "QcLogisticsTrackingEsDTO{" +
                "id=" + id +
                ", shipmentId='" + shipmentId + '\'' +
                ", account='" + account + '\'' +
                ", sendDate=" + sendDate +
                ", volumeRatio='" + volumeRatio + '\'' +
                ", channel='" + channel + '\'' +
                ", totalBoxNum=" + totalBoxNum +
                ", squareNum=" + squareNum +
                ", weight=" + weight +
                ", units=" + units +
                ", price=" + price +
                ", warehouseCode='" + warehouseCode + '\'' +
                ", logisticsPrice=" + logisticsPrice +
                ", aveUnitPrice=" + aveUnitPrice +
                ", sailDate=" + sailDate +
                ", arrivalDate=" + arrivalDate +
                ", signForDate=" + signForDate +
                ", ageing=" + ageing +
                ", waybillNum='" + waybillNum + '\'' +
                ", paymentStatus=" + paymentStatus +
                ", shipsName='" + shipsName + '\'' +
                ", groundingNum=" + groundingNum +
                ", isDelete=" + isDelete +
                ", status=" + status +
                ", createUserId=" + createUserId +
                ", createUserName='" + createUserName + '\'' +
                ", updateUserId=" + updateUserId +
                ", updateUserName='" + updateUserName + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", remark='" + remark + '\'' +
                '}';
    }
}
